import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    components: {
      default: Home,
    },
    meta: {
      til: "优选"
    },
  },
  {
    path: "/assort",
    name: "assort",
    components: {
      default: () => import("../views/assort"),
    },
    meta: {
      til: "列表"
    },
  },
  {
    path: "/details",
    name: "details",
    components: {
      default: () => import("../views/details"),
    },
    meta: {
      til: "详情"
    },
  },
  {
    path: "/login",
    name: "login",
    components: {
      default: () => import("../views/login"),
    },
    meta: {
      til: "登录"
    },
  },
  {
    path: "/message",
    name: "message",
    components: {
      default: () => import("../views/message"),
    },
    meta: {
      til: "鱼讯"
    },
  },
  {
    path: "/newly",
    name: "newly",
    components: {
      default: () => import("../views/newly"),
    },
    meta: {
      til: "新建"
    },
  },
  {
    path: "/news",
    name: "news",
    components: {
      default: () => import("../views/news"),
    },
    meta: {
      til: "消息"
    },
  },
  {
    path: "/order",
    name: "order",
    components: {
      default: () => import("../views/order"),
    },
    meta: {
      til: "订单"
    },
  },
  {
    path: "/personal",
    name: "personal",
    components: {
      default: () => import("../views/personal"),
    },
    meta: {
      til: "个人中心"
    },
  },
  {
    path: '/users/:loginname',
    name: 'users',
    components: {
      default:() => import( '../views/users'),
    },
    meta: {
      til: "个人主页",
    }
  },
  {
    path: "/shopping_car",
    name: "shopping_car",
    components: {
      default: () => import("../views/shopping_car"),
    },
    meta: {
      til: "购物车"
    },
  },
  {
<<<<<<< HEAD
    path: "/list",
    name: "list",
    components: {
      default: () => import("../views/list"),
    },
    meta: {
      til: "详情"
    },
  },
  {
    path: "/signIn",
    name: "signIn",
    components: {
      default: () => import("../views/signIn"),
    },
    meta: {
      til: "签到"
    },
  },
  {
    path: "/record",
    name: "record",
    components: {
      default: () => import("../views/record"),
    },
    meta: {
      til: "微币记录"
    },
  },
  {
    path: "/search",
    name: "search",
    components: {
      default: () => import("../views/search"),
    },
    meta: {
      til: "搜索"
    },
  },
  {
    path: "/address",
    name: "address",
    components: {
      default: () => import("../views/address"),
    },
    meta: {
      til: "新增地址"
    },
  },
  
=======
    path:'/ab',
    name: "ab",
    components: {
      default: () => import("../views/message/ab"),
    },
    meta: {
      til: "关注"
    },
  },
  {
    path:'/ne',
    name: "ne",
    components: {
      default: () => import("../views/message/ne"),
    },
    meta: {
      til: "渔汛"
    },
  },
  {
    path:'/message',
    name: "message",
    components: {
      default: () => import("../views/message"),
    },
    meta: {
      til: "钓况"
    },
  },
  {
    path:'/search',
    name: "search",
    components: {
      default: () => import("../views/message/search"),
    },
    meta: {
      til: "搜钓场"
    },
  },
  {
    path:'/newshare',
    name: "newshare",
    components: {
      default: () => import("../views/newly/newshare"),
    },
    meta: {
      til: "发渔汛"
    },
  },
>>>>>>> wang
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
